home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Apple Game Sprockets / NetSprocket 1.1.1 SDK / Interfaces&Libraries / NetSprocket.h next >
Encoding:
C/C++ Source or Header  |  1998-11-30  |  15.7 KB  |  571 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        NetSprocket.h
  3.  
  4.      Contains:    Games Sprockets: NetSprocket interfaces
  5.  
  6.      Version:    Technology:    NetSprocket 1.1.1
  7.                  Release:    NetSprocket SDK, Use with 3.2 Universal Headers
  8.  
  9.      Copyright:    © 1996-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __NETSPROCKET__
  18. #define __NETSPROCKET__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21. #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #if TARGET_OS_MAC
  25. #ifndef __MACTYPES__
  26. #include <MacTypes.h>
  27. #endif
  28. #ifndef __EVENTS__
  29. #include <Events.h>
  30. #endif
  31.  
  32. #include <OpenTransport.h>
  33. #include <OpenTptInternet.h>
  34.  
  35. #endif  /* TARGET_OS_MAC */
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=power
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. #if TARGET_OS_MAC
  60.  
  61. enum {
  62.     kNSpMaxPlayerNameLen        = 31,
  63.     kNSpMaxGroupNameLen            = 31,
  64.     kNSpMaxPasswordLen            = 31,
  65.     kNSpMaxGameNameLen            = 31,
  66.     kNSpMaxDefinitionStringLen    = 255
  67. };
  68.  
  69.  
  70. /* NetSprocket basic types */
  71. typedef struct OpaqueNSpGameReference*     NSpGameReference;
  72. typedef struct OpaqueNSpProtocolReference*  NSpProtocolReference;
  73. typedef struct OpaqueNSpProtocolListReference*  NSpProtocolListReference;
  74. typedef struct OpaqueNSpAddressReference*  NSpAddressReference;
  75. typedef SInt32                             NSpEventCode;
  76. typedef SInt32                             NSpGameID;
  77. typedef SInt32                             NSpPlayerID;
  78. typedef NSpPlayerID                     NSpGroupID;
  79. typedef UInt32                             NSpPlayerType;
  80. typedef SInt32                             NSpFlags;
  81. typedef Str31                             NSpPlayerName;
  82. /* Individual player info */
  83.  
  84.     struct NSpPlayerInfo {
  85.         NSpPlayerID                     id;
  86.         NSpPlayerType                     type;
  87.         Str31                             name;
  88.         UInt32                             groupCount;
  89.         NSpGroupID                         groups[1];
  90.     };
  91.     typedef struct NSpPlayerInfo NSpPlayerInfo;
  92.     
  93. typedef NSpPlayerInfo *                    NSpPlayerInfoPtr;
  94. /* list of all players */
  95.  
  96. struct NSpPlayerEnumeration {
  97.     UInt32                             count;
  98.     NSpPlayerInfoPtr                 playerInfo[1];
  99. };
  100. typedef struct NSpPlayerEnumeration        NSpPlayerEnumeration;
  101. typedef NSpPlayerEnumeration *            NSpPlayerEnumerationPtr;
  102. /* Individual group info */
  103.  
  104. struct NSpGroupInfo {
  105.     NSpGroupID                         id;
  106.     UInt32                             playerCount;
  107.     NSpPlayerID                     players[1];
  108. };
  109. typedef struct NSpGroupInfo                NSpGroupInfo;
  110. typedef NSpGroupInfo *                    NSpGroupInfoPtr;
  111. /* List of all groups */
  112.  
  113. struct NSpGroupEnumeration {
  114.     UInt32                             count;
  115.     NSpGroupInfoPtr                 groups[1];
  116. };
  117. typedef struct NSpGroupEnumeration        NSpGroupEnumeration;
  118. typedef NSpGroupEnumeration *            NSpGroupEnumerationPtr;
  119. /* Topology types */
  120.  
  121. typedef UInt32                             NSpTopology;
  122.  
  123. enum {
  124.     kNSpClientServer            = 0x00000001
  125. };
  126.  
  127. /* Game information */
  128.  
  129. struct NSpGameInfo {
  130.     UInt32                             maxPlayers;
  131.     UInt32                             currentPlayers;
  132.     UInt32                             currentGroups;
  133.     NSpTopology                     topology;
  134.     UInt32                             reserved;
  135.     Str31                             name;
  136.     Str31                             password;
  137. };
  138. typedef struct NSpGameInfo                NSpGameInfo;
  139. /* Structure used for sending and receiving network messages */
  140.  
  141.     struct NSpMessageHeader {
  142.         UInt32                             version;                    /* Used by NetSprocket.  Don't touch this */
  143.         SInt32                             what;                        /* The kind of message (e.g. player joined) */
  144.         NSpPlayerID                     from;                        /* ID of the sender */
  145.         NSpPlayerID                     to;                            /* (player or group) id of the intended recipient */
  146.         UInt32                             id;                            /* Unique ID for this message & (from) player */
  147.         UInt32                             when;                        /* Timestamp for the message */
  148.         UInt32                             messageLen;                    /* Bytes of data in the entire message (including the header) */
  149.     };
  150.     typedef struct NSpMessageHeader NSpMessageHeader;
  151.     
  152. /* NetSprocket-defined message structures */
  153.  
  154. struct NSpErrorMessage {
  155.     NSpMessageHeader                 header;
  156.     OSStatus                         error;
  157. };
  158. typedef struct NSpErrorMessage            NSpErrorMessage;
  159.  
  160. struct NSpJoinRequestMessage {
  161.     NSpMessageHeader                 header;
  162.     Str31                             name;
  163.     Str31                             password;
  164.     UInt32                             theType;
  165.     UInt32                             customDataLen;
  166.     UInt8                             customData[1];
  167. };
  168. typedef struct NSpJoinRequestMessage    NSpJoinRequestMessage;
  169.  
  170. struct NSpJoinApprovedMessage {
  171.     NSpMessageHeader                 header;
  172. };
  173. typedef struct NSpJoinApprovedMessage    NSpJoinApprovedMessage;
  174.  
  175. struct NSpJoinDeniedMessage {
  176.     NSpMessageHeader                 header;
  177.     Str255                             reason;
  178. };
  179. typedef struct NSpJoinDeniedMessage        NSpJoinDeniedMessage;
  180.  
  181. struct NSpPlayerJoinedMessage {
  182.     NSpMessageHeader                 header;
  183.     UInt32                             playerCount;
  184.     NSpPlayerInfo                     playerInfo;
  185. };
  186. typedef struct NSpPlayerJoinedMessage    NSpPlayerJoinedMessage;
  187.  
  188. struct NSpPlayerLeftMessage {
  189.     NSpMessageHeader                 header;
  190.     UInt32                             playerCount;
  191.     NSpPlayerID                     playerID;
  192.     NSpPlayerName                     playerName;
  193. };
  194. typedef struct NSpPlayerLeftMessage        NSpPlayerLeftMessage;
  195.  
  196. struct NSpHostChangedMessage {
  197.     NSpMessageHeader                 header;
  198.     NSpPlayerID                     newHost;
  199. };
  200. typedef struct NSpHostChangedMessage    NSpHostChangedMessage;
  201.  
  202. struct NSpGameTerminatedMessage {
  203.     NSpMessageHeader                 header;
  204. };
  205. typedef struct NSpGameTerminatedMessage    NSpGameTerminatedMessage;
  206. /* Different kinds of messages.  These can NOT be bitwise ORed together */
  207.  
  208. enum {
  209.     kNSpSendFlag_Junk            = 0x00100000,                    /* will be sent (try once) when there is nothing else pending */
  210.     kNSpSendFlag_Normal            = 0x00200000,                    /* will be sent immediately (try once) */
  211.     kNSpSendFlag_Registered        = 0x00400000                    /* will be sent immediately (guaranteed, in order) */
  212. };
  213.  
  214.  
  215. /* Options for message delivery.  These can be bitwise ORed together with each other,
  216.         as well as with ONE of the above */
  217.  
  218. enum {
  219.     kNSpSendFlag_FailIfPipeFull    = 0x00000001,
  220.     kNSpSendFlag_SelfSend        = 0x00000002,
  221.     kNSpSendFlag_Blocking        = 0x00000004
  222. };
  223.  
  224.  
  225. /* Options for Hosting Joining, and Deleting games */
  226.  
  227. enum {
  228.     kNSpGameFlag_DontAdvertise    = 0x00000001,
  229.     kNSpGameFlag_ForceTerminateGame = 0x00000002
  230. };
  231.  
  232. /* Message "what" types */
  233. /* Apple reserves all negative "what" values (anything with bit 32 set) */
  234.  
  235. enum {
  236.     kNSpSystemMessagePrefix        = (long)0x80000000,
  237.     kNSpError                    = kNSpSystemMessagePrefix | 0x7FFFFFFF,
  238.     kNSpJoinRequest                = kNSpSystemMessagePrefix | 0x00000001,
  239.     kNSpJoinApproved            = kNSpSystemMessagePrefix | 0x00000002,
  240.     kNSpJoinDenied                = kNSpSystemMessagePrefix | 0x00000003,
  241.     kNSpPlayerJoined            = kNSpSystemMessagePrefix | 0x00000004,
  242.     kNSpPlayerLeft                = kNSpSystemMessagePrefix | 0x00000005,
  243.     kNSpHostChanged                = kNSpSystemMessagePrefix | 0x00000006,
  244.     kNSpGameTerminated            = kNSpSystemMessagePrefix | 0x00000007
  245. };
  246.  
  247.  
  248. /* Special TPlayerIDs  for sending messages */
  249.  
  250. enum {
  251.     kNSpAllPlayers                = 0x00000000,
  252.     kNSpHostOnly                = (long)0xFFFFFFFF
  253. };
  254.  
  255.  
  256. /* NetSprocket Error Codes */
  257.  
  258. enum {
  259.     kNSpInitializationFailedErr    = -30360,
  260.     kNSpAlreadyInitializedErr    = -30361,
  261.     kNSpTopologyNotSupportedErr    = -30362,
  262.     kNSpPipeFullErr                = -30364,
  263.     kNSpHostFailedErr            = -30365,
  264.     kNSpProtocolNotAvailableErr    = -30366,
  265.     kNSpInvalidGameRefErr        = -30367,
  266.     kNSpInvalidParameterErr        = -30369,
  267.     kNSpOTNotPresentErr            = -30370,
  268.     kNSpOTVersionTooOldErr        = -30371,
  269.     kNSpMemAllocationErr        = -30373,
  270.     kNSpAlreadyAdvertisingErr    = -30374,
  271.     kNSpNotAdvertisingErr        = -30376,
  272.     kNSpInvalidAddressErr        = -30377,
  273.     kNSpFreeQExhaustedErr        = -30378,
  274.     kNSpRemovePlayerFailedErr    = -30379,
  275.     kNSpAddressInUseErr            = -30380,
  276.     kNSpFeatureNotImplementedErr = -30381,
  277.     kNSpNameRequiredErr            = -30382,
  278.     kNSpInvalidPlayerIDErr        = -30383,
  279.     kNSpInvalidGroupIDErr        = -30384,
  280.     kNSpNoPlayersErr            = -30385,
  281.     kNSpNoGroupsErr                = -30386,
  282.     kNSpNoHostVolunteersErr        = -30387,
  283.     kNSpCreateGroupFailedErr    = -30388,
  284.     kNSpAddPlayerFailedErr        = -30389,
  285.     kNSpInvalidDefinitionErr    = -30390,
  286.     kNSpInvalidProtocolRefErr    = -30391,
  287.     kNSpInvalidProtocolListErr    = -30392,
  288.     kNSpTimeoutErr                = -30393,
  289.     kNSpGameTerminatedErr        = -30394,
  290.     kNSpConnectFailedErr        = -30395,
  291.     kNSpSendFailedErr            = -30396,
  292.     kNSpMessageTooBigErr        = -30397,
  293.     kNSpCantBlockErr            = -30398,
  294.     kNSpJoinFailedErr            = -30399
  295. };
  296.  
  297.  
  298.  
  299.  
  300. /************************  Initialization  ************************/
  301. EXTERN_API_C( OSStatus )
  302. NSpInitialize                    (UInt32                 inStandardMessageSize,
  303.                                  UInt32                 inBufferSize,
  304.                                  UInt32                 inQElements,
  305.                                  NSpGameID                 inGameID,
  306.                                  UInt32                 inTimeout);
  307.  
  308.  
  309.  
  310.  
  311. /**************************  Protocols  **************************/
  312. /* Programmatic protocol routines */
  313. EXTERN_API_C( OSStatus )
  314. NSpProtocol_New                    (const char *            inDefinitionString,
  315.                                  NSpProtocolReference *    outReference);
  316.  
  317. EXTERN_API_C( void )
  318. NSpProtocol_Dispose                (NSpProtocolReference     inProtocolRef);
  319.  
  320. EXTERN_API_C( OSStatus )
  321. NSpProtocol_ExtractDefinitionString (NSpProtocolReference  inProtocolRef,
  322.                                  char *                    outDefinitionString);
  323.  
  324.  
  325. /* Protocol list routines */
  326. EXTERN_API_C( OSStatus )
  327. NSpProtocolList_New                (NSpProtocolReference     inProtocolRef,
  328.                                  NSpProtocolListReference * outList);
  329.  
  330. EXTERN_API_C( void )
  331. NSpProtocolList_Dispose            (NSpProtocolListReference  inProtocolList);
  332.  
  333. EXTERN_API_C( OSStatus )
  334. NSpProtocolList_Append            (NSpProtocolListReference  inProtocolList,
  335.                                  NSpProtocolReference     inProtocolRef);
  336.  
  337. EXTERN_API_C( OSStatus )
  338. NSpProtocolList_Remove            (NSpProtocolListReference  inProtocolList,
  339.                                  NSpProtocolReference     inProtocolRef);
  340.  
  341. EXTERN_API_C( OSStatus )
  342. NSpProtocolList_RemoveIndexed    (NSpProtocolListReference  inProtocolList,
  343.                                  UInt32                 inIndex);
  344.  
  345. EXTERN_API_C( UInt32 )
  346. NSpProtocolList_GetCount        (NSpProtocolListReference  inProtocolList);
  347.  
  348. EXTERN_API_C( NSpProtocolReference )
  349. NSpProtocolList_GetIndexedRef    (NSpProtocolListReference  inProtocolList,
  350.                                  UInt32                 inIndex);
  351.  
  352.  
  353. /* Helpers */
  354. EXTERN_API_C( NSpProtocolReference )
  355. NSpProtocol_CreateAppleTalk        (ConstStr31Param         inNBPName,
  356.                                  ConstStr31Param         inNBPType,
  357.                                  UInt32                 inMaxRTT,
  358.                                  UInt32                 inMinThruput);
  359.  
  360. EXTERN_API_C( NSpProtocolReference )
  361. NSpProtocol_CreateIP            (InetPort                 inPort,
  362.                                  UInt32                 inMaxRTT,
  363.                                  UInt32                 inMinThruput);
  364.  
  365.  
  366. /***********************  Human Interface  ************************/
  367. typedef CALLBACK_API( Boolean , NSpEventProcPtr )(EventRecord *inEvent);
  368. EXTERN_API_C( NSpAddressReference )
  369. NSpDoModalJoinDialog            (ConstStr31Param         inGameType,
  370.                                  ConstStr255Param         inEntityListLabel,
  371.                                  Str31                     ioName,
  372.                                  Str31                     ioPassword,
  373.                                  NSpEventProcPtr         inEventProcPtr);
  374.  
  375. EXTERN_API_C( Boolean )
  376. NSpDoModalHostDialog            (NSpProtocolListReference  ioProtocolList,
  377.                                  Str31                     ioGameName,
  378.                                  Str31                     ioPlayerName,
  379.                                  Str31                     ioPassword,
  380.                                  NSpEventProcPtr         inEventProcPtr);
  381.  
  382.  
  383. /*********************  Hosting and Joining  **********************/
  384. EXTERN_API_C( OSStatus )
  385. NSpGame_Host                    (NSpGameReference *        outGame,
  386.                                  NSpProtocolListReference  inProtocolList,
  387.                                  UInt32                 inMaxPlayers,
  388.                                  ConstStr31Param         inGameName,
  389.                                  ConstStr31Param         inPassword,
  390.                                  ConstStr31Param         inPlayerName,
  391.                                  NSpPlayerType             inPlayerType,
  392.                                  NSpTopology             inTopology,
  393.                                  NSpFlags                 inFlags);
  394.  
  395. EXTERN_API_C( OSStatus )
  396. NSpGame_Join                    (NSpGameReference *        outGame,
  397.                                  NSpAddressReference     inAddress,
  398.                                  ConstStr31Param         inName,
  399.                                  ConstStr31Param         inPassword,
  400.                                  NSpPlayerType             inType,
  401.                                  void *                    inCustomData,
  402.                                  UInt32                 inCustomDataLen,
  403.                                  NSpFlags                 inFlags);
  404.  
  405. EXTERN_API_C( OSStatus )
  406. NSpGame_EnableAdvertising        (NSpGameReference         inGame,
  407.                                  NSpProtocolReference     inProtocol,
  408.                                  Boolean                 inEnable);
  409.  
  410. EXTERN_API_C( OSStatus )
  411. NSpGame_Dispose                    (NSpGameReference         inGame,
  412.                                  NSpFlags                 inFlags);
  413.  
  414. EXTERN_API_C( OSStatus )
  415. NSpGame_GetInfo                    (NSpGameReference         inGame,
  416.                                  NSpGameInfo *            ioInfo);
  417.  
  418. /**************************  Messaging  **************************/
  419. EXTERN_API_C( OSStatus )
  420. NSpMessage_Send                    (NSpGameReference         inGame,
  421.                                  NSpMessageHeader *        inMessage,
  422.                                  NSpFlags                 inFlags);
  423.  
  424. EXTERN_API_C( NSpMessageHeader *)
  425. NSpMessage_Get                    (NSpGameReference         inGame);
  426.  
  427. EXTERN_API_C( void )
  428. NSpMessage_Release                (NSpGameReference         inGame,
  429.                                  NSpMessageHeader *        inMessage);
  430.  
  431. /* Helpers */
  432. EXTERN_API_C( OSStatus )
  433. NSpMessage_SendTo                (NSpGameReference         inGame,
  434.                                  NSpPlayerID             inTo,
  435.                                  SInt32                 inWhat,
  436.                                  void *                    inData,
  437.                                  UInt32                 inDataLen,
  438.                                  NSpFlags                 inFlags);
  439.  
  440.  
  441. /*********************  Player Information  **********************/
  442. EXTERN_API_C( NSpPlayerID )
  443. NSpPlayer_GetMyID                (NSpGameReference         inGame);
  444.  
  445. EXTERN_API_C( OSStatus )
  446. NSpPlayer_GetInfo                (NSpGameReference         inGame,
  447.                                  NSpPlayerID             inPlayerID,
  448.                                  NSpPlayerInfoPtr *        outInfo);
  449.  
  450. EXTERN_API_C( void )
  451. NSpPlayer_ReleaseInfo            (NSpGameReference         inGame,
  452.                                  NSpPlayerInfoPtr         inInfo);
  453.  
  454. EXTERN_API_C( OSStatus )
  455. NSpPlayer_GetEnumeration        (NSpGameReference         inGame,
  456.                                  NSpPlayerEnumerationPtr * outPlayers);
  457.  
  458. EXTERN_API_C( void )
  459. NSpPlayer_ReleaseEnumeration    (NSpGameReference         inGame,
  460.                                  NSpPlayerEnumerationPtr  inPlayers);
  461.  
  462. EXTERN_API_C( UInt32 )
  463. NSpPlayer_GetRoundTripTime        (NSpGameReference         inGame,
  464.                                  NSpPlayerID             inPlayer);
  465.  
  466. EXTERN_API_C( UInt32 )
  467. NSpPlayer_GetThruput            (NSpGameReference         inGame,
  468.                                  NSpPlayerID             inPlayer);
  469.  
  470.  
  471. /*********************  Group Management  **********************/
  472. EXTERN_API_C( OSStatus )
  473. NSpGroup_New                    (NSpGameReference         inGame,
  474.                                  NSpGroupID *            outGroupID);
  475.  
  476. EXTERN_API_C( OSStatus )
  477. NSpGroup_Dispose                (NSpGameReference         inGame,
  478.                                  NSpGroupID             inGroupID);
  479.  
  480. EXTERN_API_C( OSStatus )
  481. NSpGroup_AddPlayer                (NSpGameReference         inGame,
  482.                                  NSpGroupID             inGroupID,
  483.                                  NSpPlayerID             inPlayerID);
  484.  
  485. EXTERN_API_C( OSStatus )
  486. NSpGroup_RemovePlayer            (NSpGameReference         inGame,
  487.                                  NSpGroupID             inGroupID,
  488.                                  NSpPlayerID             inPlayerID);
  489.  
  490. EXTERN_API_C( OSStatus )
  491. NSpGroup_GetInfo                (NSpGameReference         inGame,
  492.                                  NSpGroupID             inGroupID,
  493.                                  NSpGroupInfoPtr *        outInfo);
  494.  
  495. EXTERN_API_C( void )
  496. NSpGroup_ReleaseInfo            (NSpGameReference         inGame,
  497.                                  NSpGroupInfoPtr         inInfo);
  498.  
  499. EXTERN_API_C( OSStatus )
  500. NSpGroup_GetEnumeration            (NSpGameReference         inGame,
  501.                                  NSpGroupEnumerationPtr * outGroups);
  502.  
  503. EXTERN_API_C( void )
  504. NSpGroup_ReleaseEnumeration        (NSpGameReference         inGame,
  505.                                  NSpGroupEnumerationPtr  inGroups);
  506.  
  507.  
  508. /**************************  Utilities  ***************************/
  509. EXTERN_API_C( NumVersion )
  510. NSpGetVersion                    (void);
  511.  
  512. EXTERN_API_C( void )
  513. NSpClearMessageHeader            (NSpMessageHeader *        inMessage);
  514.  
  515. EXTERN_API_C( UInt32 )
  516. NSpGetCurrentTimeStamp            (NSpGameReference         inGame);
  517.  
  518. EXTERN_API_C( NSpAddressReference )
  519. NSpConvertOTAddrToAddressReference (OTAddress *            inAddress);
  520.  
  521. EXTERN_API_C( OTAddress *)
  522. NSpConvertAddressReferenceToOTAddr (NSpAddressReference  inAddress);
  523.  
  524. EXTERN_API_C( void )
  525. NSpReleaseAddressReference        (NSpAddressReference     inAddress);
  526.  
  527.  
  528. /************************ Advanced/Async routines ****************/
  529. typedef CALLBACK_API( void , NSpCallbackProcPtr )(NSpGameReference inGame, void *inContext, NSpEventCode inCode, OSStatus inStatus, void *inCookie);
  530. EXTERN_API_C( OSStatus )
  531. NSpInstallCallbackHandler        (NSpCallbackProcPtr     inHandler,
  532.                                  void *                    inContext);
  533.  
  534.  
  535. typedef CALLBACK_API( Boolean , NSpJoinRequestHandlerProcPtr )(NSpGameReference inGame, NSpJoinRequestMessage *inMessage, void *inContext, Str255 outReason);
  536. EXTERN_API_C( OSStatus )
  537. NSpInstallJoinRequestHandler    (NSpJoinRequestHandlerProcPtr  inHandler,
  538.                                  void *                    inContext);
  539.  
  540.  
  541. typedef CALLBACK_API( Boolean , NSpMessageHandlerProcPtr )(NSpGameReference inGame, NSpMessageHeader *inMessage, void *inContext);
  542. EXTERN_API_C( OSStatus )
  543. NSpInstallAsyncMessageHandler    (NSpMessageHandlerProcPtr  inHandler,
  544.                                  void *                    inContext);
  545.  
  546.  
  547.  
  548. #endif  /* TARGET_OS_MAC */
  549.  
  550.  
  551. #if PRAGMA_STRUCT_ALIGN
  552.     #pragma options align=reset
  553. #elif PRAGMA_STRUCT_PACKPUSH
  554.     #pragma pack(pop)
  555. #elif PRAGMA_STRUCT_PACK
  556.     #pragma pack()
  557. #endif
  558.  
  559. #ifdef PRAGMA_IMPORT_OFF
  560. #pragma import off
  561. #elif PRAGMA_IMPORT
  562. #pragma import reset
  563. #endif
  564.  
  565. #ifdef __cplusplus
  566. }
  567. #endif
  568.  
  569. #endif /* __NETSPROCKET__ */
  570.  
  571.